Kanzi  3.9.7
Kanzi Engine API
Bindings

Bindings set the value of a property or property field with the value from another property, property field, or a data source. More...

Collaboration diagram for Bindings:

Classes

class  kanzi::AbstractBinding
 AbstractBinding is the base class for binding classes. More...
 
class  kanzi::AbstractBindingRuntime
 Base class for binding runtimes. More...
 
class  kanzi::AbstractBindingVariableSource
 Abstract interface for VariableBindingSources and VariableExpressionValueSource. More...
 
class  kanzi::AbstractExpressionValueSource
 Value source base for use in bindings with multiple sources. More...
 
class  kanzi::AbstractExpressionValueSourceRuntime
 Runtime base class for expression value sources. More...
 
class  kanzi::AnimationBindingProcessor
 Animation binding processor executes an animation and calculates the value for use in expression bindings. More...
 
class  kanzi::Binding
 Binding is the simplest form of binding. More...
 
class  kanzi::BindingBaseRuntime
 Base runtime class for simple one-on-one bindings. More...
 
struct  kanzi::BindingExpressionOpCode
 Expression binding operation. More...
 
struct  kanzi::BindingExpressionOpCodeParameters
 Runtime Parameters for binding expression opcodes. More...
 
class  kanzi::BindingHostConcept
 BindingHostConcept specifies an interface for adding and removing bindings to the binding host. More...
 
class  kanzi::BindingHostConceptImpl< TDerivedClass >
 Implementation class for BindingHostConcept. More...
 
struct  kanzi::BindingLoadInfo
 Use the BindingLoadInfo to create the information for a binding that you need when adding the binding to an object. More...
 
class  kanzi::BindingLookupContext
 Lookup context for bindings. More...
 
class  kanzi::BindingLookupNotificationBase
 Base class for notifications on binding lookup. More...
 
class  kanzi::BindingNodeLookupContext
 Binding lookup context for Node. More...
 
class  kanzi::BindingProcessor
 Binding processor. More...
 
class  kanzi::BindingRenderPassLookupContext
 Binding lookup context for RenderPass. More...
 
class  kanzi::BindingRenderValueLookupContext
 Binding lookup context for render value associations. More...
 
class  kanzi::BindingRuntime
 Runtime for binding. More...
 
class  kanzi::BindingRuntimeHandle
 Handler for binding runtimes. More...
 
class  kanzi::BindingSource
 Binding source contains all the persistent data that you need to access a source value for the binding. More...
 
class  kanzi::BindingSourceRuntime
 Binding source runtime interface. More...
 
class  kanzi::BindingTargetRuntime
 Binding target runtime interface. More...
 
class  kanzi::BindingToken
 Helper class that manages the lifetime of the runtime binding owned by a Node or a RenderPass, by removing the owned binding on the destruction of that Node or the RenderPass. More...
 
class  kanzi::BindingTriggerLookupContext
 Binding lookup context for Node. More...
 
class  kanzi::BindingValueSourceOwner
 Owner for value source bindings. More...
 
class  kanzi::CallbackBindingProcessor
 Callback processor. More...
 
class  kanzi::ConstraintBindingProcessor
 Binding processor structure for constraints. More...
 
class  kanzi::ExpressionBinding
 ExpressionBinding enables you to bind from multiple sources to one target, and to modify the values before writing them to target values. More...
 
class  kanzi::ExpressionBindingProcessor
 Expression binding processor. More...
 
class  kanzi::ExpressionBindingRuntime
 Runtime for expression binding. More...
 
class  kanzi::ExpressionBindingSource
 Expression binding source collects expression value sources and executes operations on the values to produce a read result. More...
 
class  kanzi::ExpressionBindingSourceRuntime
 Runtime for expression binding source. More...
 

Typedefs

typedef bool(* kanzi::BindingExpressionFunction) (BindingExpressionOpCodeParameters &params)
 Expression function pointer type. More...
 

Enumerations

enum  kanzi::BindingBinaryTargetType { kanzi::BindingTargetTypeValueSource, kanzi::BindingTargetTypeModifier, kanzi::BindingTargetTypeRenderValue, kanzi::BindingTargetTypeVariable }
 Binding precedence (binary file). More...
 
enum  kanzi::BindingExpressionArgumentType : int16_t {
  kanzi::BindingExpressionArgumentTypeTemporaryRegister0, kanzi::BindingExpressionArgumentTypeTemporaryRegister1, kanzi::BindingExpressionArgumentTypeTemporaryRegister2, kanzi::BindingExpressionArgumentTypeTemporaryRegister3,
  kanzi::BindingExpressionArgumentTypeTemporaryRegister4, kanzi::BindingExpressionArgumentTypeTemporaryRegister5, kanzi::BindingExpressionArgumentTypeTemporaryRegister6, kanzi::BindingExpressionArgumentTypeConstantRegister0,
  kanzi::BindingExpressionArgumentTypeConstantRegister1, kanzi::BindingExpressionArgumentTypeConstantRegister2, kanzi::BindingExpressionArgumentTypeConstantRegister3, kanzi::BindingExpressionArgumentTypeConstantRegister4,
  kanzi::BindingExpressionArgumentTypeConstantRegister5, kanzi::BindingExpressionArgumentTypeConstantRegister6, kanzi::BindingExpressionArgumentTypeSourceRegister0, kanzi::BindingExpressionArgumentTypeSourceRegister1,
  kanzi::BindingExpressionArgumentTypeSourceRegister2, kanzi::BindingExpressionArgumentTypeSourceRegister3, kanzi::BindingExpressionArgumentTypeSourceRegister4, kanzi::BindingExpressionArgumentTypeSourceRegister5,
  kanzi::BindingExpressionArgumentTypeSourceRegister6, kanzi::BindingExpressionArgumentTypeDataSourceRegister0, kanzi::BindingExpressionArgumentTypeDataSourceRegister1, kanzi::BindingExpressionArgumentTypeDataSourceRegister2,
  kanzi::BindingExpressionArgumentTypeDataSourceRegister3, kanzi::BindingExpressionArgumentTypeDataSourceRegister4, kanzi::BindingExpressionArgumentTypeDataSourceRegister5, kanzi::BindingExpressionArgumentTypeDataSourceRegister6
}
 Runtime expression validator argument type. More...
 
enum  kanzi::BindingMode { kanzi::BindingModeInvalid, kanzi::BindingModeOneWay, kanzi::BindingModeTwoWay, kanzi::BindingModeToSource }
 Binding mode (binary file). More...
 
enum  kanzi::KzuExpressionValidatorBinaryArgumentType {
  kanzi::KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_SOURCE, kanzi::KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_TARGET, kanzi::KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_SOURCE_REGISTER_0, kanzi::KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_CONSTANT_REGISTER_0,
  kanzi::KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_TEMPORARY_REGISTER_0, kanzi::KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_DATA_SOURCE_REGISTER_0
}
 Expression argument type from binary data. More...
 
enum  kanzi::KzuExpressionValidatorOperation : int16_t {
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_WRITE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ADD, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SUBTRACT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_MULTIPLY,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_DIVIDE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_MODULO, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ABS, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_MIN,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_MAX, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_CEIL, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_FLOOR, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ROUND,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_POW, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SQRT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_STEP, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_BOOL,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_INT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_FLOAT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_STRING, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_REMAINDER,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION_X, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION_Y, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION_Z,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE_X, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE_Y, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE_Z,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_EXTRACT_EULER_X, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_EXTRACT_EULER_Y, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_EXTRACT_EULER_Z, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CURRENT_VALUE,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ACQUIRE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_GREATER, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_GREATER_OR_EQUAL, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_LESS,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_LESS_OR_EQUAL, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_EQUAL, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_NOT_EQUAL, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_LOGICAL_AND,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_LOGICAL_OR, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_LOGICAL_NOT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_MATRIX3x3, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_MATRIX4x4,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_SRT2D, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_SRT3D, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SIN, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_COS,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TAN, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ASIN, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ACOS, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ATAN,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ATAN2, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SINC, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_DOT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_CROSS,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_INVERSE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_FIELD, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SET_FIELD, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TRANSFORM,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_CLAMP, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_MIX, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_LINEARSTEP, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SMOOTHSTEP,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SMOOTHERSTEP, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_PROJECTION_CAMERA_WORLD_MATRIX, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CAMERA_WORLD_MATRIX, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_WORLD_MATRIX,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_NORMAL_MATRIX, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CAMERA_POSITION, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_AMBIENT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TERNARY_CONDITIONAL,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_LINEAR_TO_SRGB, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SRGB_TO_LINEAR, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TRANSPOSE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_PREMULTIPLY_COLOR,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_VIEW_POSITION, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SPLIT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_EVALUATE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ITERATOR,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_VIEW, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_COLOR4, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_VECTOR2, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_VECTOR3,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TO_VECTOR4, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_WIDTH, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_HEIGHT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_SIZE,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_PIXEL_FORMAT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_ADDRESSING_MODE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_DEPTH_COMPARE_FUNCTION, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_FILTER_MODE,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_MIPMAP_MODE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_ANISOTROPY_LEVEL, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_MULTISAMPLE_LEVEL, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_NOT,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_AND, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_OR, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_XOR, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_LEFT_SHIFT,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_RIGHT_SHIFT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_HSL_TO_SRGB, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SRGB_TO_HSL, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SIGN,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_LENGTH, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_NORMALIZE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_ROW, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SET_ROW,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_COLUMN, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_SET_COLUMN, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_CONTINUE_IF, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CAMERA_NORMAL_MATRIX,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_STRING_FORMAT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_APPEND_RANGE, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_POSITION_CONSTRAINT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_ORIENTATION_CONSTRAINT,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_LOOK_AT_CONSTRAINT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_REVERSED_LOOK_AT_CONSTRAINT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_REVERSED_CYLINDRICAL_LOOK_AT_CONSTRAINT, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_0, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_1, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_2, kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_3,
  kanzi::KZU_EXPRESSION_VALIDATOR_OPERATION_INVALID
}
 Expression operation. More...
 
enum  kanzi::KzuPropertyBinaryTargetAttribute {
  kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_TRANSLATION_X, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_TRANSLATION_Y, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_TRANSLATION_Z, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_SCALE_X,
  kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_SCALE_Y, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_SCALE_Z, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_ROTATION_Z, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_ROTATION_Y,
  kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_ROTATION_X, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_WHOLE_PROPERTY, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_COLOR_R, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_COLOR_G,
  kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_COLOR_B, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_COLOR_A, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_VECTOR_X, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_VECTOR_Y,
  kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_VECTOR_Z, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_VECTOR_W, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_SCALE, kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_ROTATION,
  kanzi::KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_TRANSLATION
}
 Binding property field (binary file). More...
 

Functions

int kanzi::bindingExpressionDivide (int lhs, int rhs)
 Integer divide the expression way. More...
 
float kanzi::bindingExpressionDivide (float lhs, float rhs)
 Floating point divide the expression way. More...
 
ColorRGBA kanzi::bindingExpressionDivide (const ColorRGBA &lhs, const ColorRGBA &rhs)
 Color divide the expression way. More...
 
Vector2 kanzi::bindingExpressionDivide (const Vector2 &lhs, const Vector2 &rhs)
 Vector2 divide the expression way. More...
 
Vector3 kanzi::bindingExpressionDivide (const Vector3 &lhs, const Vector3 &rhs)
 Vector3 divide the expression way. More...
 
Vector4 kanzi::bindingExpressionDivide (const Vector4 &lhs, const Vector4 &rhs)
 Vector4 divide the expression way. More...
 
BindingExpressionFunction kanzi::bindingExpressionFunctionFromOperation (KzuExpressionValidatorOperation operation)
 Converts expression validation operation to a binding expression function. More...
 
int kanzi::bindingExpressionModulo (int lhs, int rhs)
 Integer modulo the expression way. More...
 
float kanzi::bindingExpressionModulo (float lhs, float rhs)
 Floating point modulo the expression way. More...
 
ColorRGBA kanzi::bindingExpressionModulo (const ColorRGBA &lhs, const ColorRGBA &rhs)
 Color modulo the expression way. More...
 
Vector2 kanzi::bindingExpressionModulo (const Vector2 &lhs, const Vector2 &rhs)
 Vector2 modulo the expression way. More...
 
Vector3 kanzi::bindingExpressionModulo (const Vector3 &lhs, const Vector3 &rhs)
 Vector3 modulo the expression way. More...
 
Vector4 kanzi::bindingExpressionModulo (const Vector4 &lhs, const Vector4 &rhs)
 Vector4 modulo the expression way. More...
 
int kanzi::bindingExpressionRemainder (int lhs, int rhs)
 Integer remainder the expression way. More...
 
float kanzi::bindingExpressionRemainder (float lhs, float rhs)
 Floating point remainder the expression way. More...
 
ColorRGBA kanzi::bindingExpressionRemainder (const ColorRGBA &lhs, const ColorRGBA &rhs)
 Color remainder the expression way. More...
 
Vector2 kanzi::bindingExpressionRemainder (const Vector2 &lhs, const Vector2 &rhs)
 Vector2 remainder the expression way. More...
 
Vector3 kanzi::bindingExpressionRemainder (const Vector3 &lhs, const Vector3 &rhs)
 Vector3 remainder the expression way. More...
 
Vector4 kanzi::bindingExpressionRemainder (const Vector4 &lhs, const Vector4 &rhs)
 Vector4 remainder the expression way. More...
 
ColorRGBA kanzi::bindingFixedOperationGetAmbient (Node &node, const Material &material)
 Fixed operation to acquire ambient color. More...
 
Matrix4x4 kanzi::bindingFixedOperationGetCameraNormalMatrix (RenderPass &renderPass, Node &node)
 Fixed operation to acquire camera normal matrix. More...
 
Vector3 kanzi::bindingFixedOperationGetCameraPosition (RenderPass &renderPass)
 Fixed operation to acquire camera position vector. More...
 
Matrix4x4 kanzi::bindingFixedOperationGetCameraWorldMatrix (RenderPass &renderPass, Node &node)
 Fixed operation to acquire camera world matrix. More...
 
Matrix4x4 kanzi::bindingFixedOperationGetNormalMatrix (Node &node)
 Fixed operation to acquire normal matrix. More...
 
Matrix4x4 kanzi::bindingFixedOperationGetProjectionCameraWorldMatrix (RenderPass &renderPass, Node &node)
 Fixed operation to acquire projection camera world matrix. More...
 
Vector4 kanzi::bindingFixedOperationGetViewPosition (RenderPass &renderPass)
 Fixed operation to acquire homogeneous view position vector. More...
 
Matrix4x4 kanzi::bindingFixedOperationGetWorldMatrix (Node &node)
 Fixed operation to acquire world matrix. More...
 
bool kanzi::expressionOperationWrite (BindingExpressionOpCodeParameters &params)
 Execute write operation. More...
 
void kanzi::extractExpressionField (Variant &outputRegister, const Variant &inputRegister, PropertyField field)
 Reads a field from an input register and writes it to the output register. More...
 
string kanzi::getExpressionOperationName (KzuExpressionValidatorOperation operation)
 Gets a string representation of an expression validator operator. More...
 
Quaternion kanzi::getQuaternionField (const Variant &variant, PropertyField field)
 Gets a quaternion field from a variant. More...
 
bool kanzi::isFixedOperationOpCode (KzuExpressionValidatorOperation opCode)
 Tells if given operation code corresponds with a fixed operation. More...
 
BindingLoadInfo kanzi::loadBinding (KzbFile &kzbFile, KzbMemoryParser &parser)
 Loads a binding from a kzb file. More...
 
void kanzi::loadBindings (KzbFile &kzbFile, KzbMemoryParser &parser, vector< BindingLoadInfo > &bindings)
 Loads bindings from a kzb file. More...
 
PropertyField kanzi::propertyFieldFromBinaryTargetAttribute (KzuPropertyBinaryTargetAttribute attribute)
 Converts a property target attribute from binary into a property field. More...
 
bool kanzi::variantSetToDataObject (const Variant &value, DataObject &dataObject)
 Sets variant value to a data object. More...
 

Detailed Description

Bindings set the value of a property or property field with the value from another property, property field, or a data source.

Bindings allow nodes, render passes, states, state objects, and styles to automatically update the values of their properties in response to the changing property values, or the occurrence of some external event.

Typedef Documentation

typedef bool(* kanzi::BindingExpressionFunction) (BindingExpressionOpCodeParameters &params)

Expression function pointer type.

Parameters
paramsAll expression operation code parameters.
Returns
True on execution successful, false otherwise.

Enumeration Type Documentation

Binding mode (binary file).

Enumerator
BindingModeInvalid 

Invalid binding mode.

BindingModeOneWay 

One-way binding.

BindingModeTwoWay 

Two-way binding.

BindingModeToSource 

To Source binding.

Binding precedence (binary file).

Enumerator
BindingTargetTypeValueSource 

Property value source (binding to whole value).

BindingTargetTypeModifier 

Property modifier (modifier to a field of property).

BindingTargetTypeRenderValue 

Render value (written to a render state).

BindingTargetTypeVariable 

Variable (property-like variable on something besides a property object).

Binding property field (binary file).

Enumerator
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_TRANSLATION_X 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_TRANSLATION_Y 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_TRANSLATION_Z 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_SCALE_X 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_SCALE_Y 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_SCALE_Z 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_ROTATION_Z 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_ROTATION_Y 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_ROTATION_X 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_WHOLE_PROPERTY 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_COLOR_R 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_COLOR_G 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_COLOR_B 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_COLOR_A 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_VECTOR_X 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_VECTOR_Y 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_VECTOR_Z 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_VECTOR_W 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_SCALE 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_ROTATION 
KZU_PROPERTY_BINARY_TARGET_ATTRIBUTE_TRANSLATION 

Expression argument type from binary data.

Converted to runtime argument type for binding operations.

Enumerator
KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_SOURCE 
KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_TARGET 
KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_SOURCE_REGISTER_0 
KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_CONSTANT_REGISTER_0 
KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_TEMPORARY_REGISTER_0 
KZU_EXPRESSION_VALIDATOR_ARGUMENT_TYPE_DATA_SOURCE_REGISTER_0 

Runtime expression validator argument type.

A bitmask is used to speed up access to register arrays and remove the need for division.

The encoding intentionally ensures only 16 bits are needed for the enumeration.

Since
Kanzi 3.7.0
Enumerator
BindingExpressionArgumentTypeTemporaryRegister0 

Temporary registers: 0 - 255 Can be directly converted to integer to access temporary register by index.

BindingExpressionArgumentTypeTemporaryRegister1 

Shorthand for temporary register index.

BindingExpressionArgumentTypeTemporaryRegister2 

Shorthand for temporary register index.

BindingExpressionArgumentTypeTemporaryRegister3 

Shorthand for temporary register index.

BindingExpressionArgumentTypeTemporaryRegister4 

Shorthand for temporary register index.

BindingExpressionArgumentTypeTemporaryRegister5 

Shorthand for temporary register index.

BindingExpressionArgumentTypeTemporaryRegister6 

Shorthand for temporary register index.

BindingExpressionArgumentTypeConstantRegister0 

Constant registers: 256 - 511.

BindingExpressionArgumentTypeConstantRegister1 

Shorthand for constant register index.

BindingExpressionArgumentTypeConstantRegister2 

Shorthand for constant register index.

BindingExpressionArgumentTypeConstantRegister3 

Shorthand for constant register index.

BindingExpressionArgumentTypeConstantRegister4 

Shorthand for constant register index.

BindingExpressionArgumentTypeConstantRegister5 

Shorthand for constant register index.

BindingExpressionArgumentTypeConstantRegister6 

Shorthand for constant register index.

BindingExpressionArgumentTypeSourceRegister0 

Source registers: 512 - 767.

BindingExpressionArgumentTypeSourceRegister1 

Shorthand for source register index.

BindingExpressionArgumentTypeSourceRegister2 

Shorthand for source register index.

BindingExpressionArgumentTypeSourceRegister3 

Shorthand for source register index.

BindingExpressionArgumentTypeSourceRegister4 

Shorthand for source register index.

BindingExpressionArgumentTypeSourceRegister5 

Shorthand for source register index.

BindingExpressionArgumentTypeSourceRegister6 

Shorthand for source register index.

BindingExpressionArgumentTypeDataSourceRegister0 

Data source registers: 768 - 1023.

BindingExpressionArgumentTypeDataSourceRegister1 

Shorthand for data source register index.

BindingExpressionArgumentTypeDataSourceRegister2 

Shorthand for data source register index.

BindingExpressionArgumentTypeDataSourceRegister3 

Shorthand for data source register index.

BindingExpressionArgumentTypeDataSourceRegister4 

Shorthand for data source register index.

BindingExpressionArgumentTypeDataSourceRegister5 

Shorthand for data source register index.

BindingExpressionArgumentTypeDataSourceRegister6 

Shorthand for data source register index.

Expression operation.

Each operation in an expression binding is identified by an integer operation code.

All operations that can be executed component-wise are executed per-component. For example, the division of two vector2 components is [param1.x / param2.x, param1.y / param2.y]. The same applies to single-parameter operations. For example, absolute value is [abs(param1.x), abs(param1.y)].

You can define arguments specifying an arbitrary rotation as either SRT3D Euler rotations or quaternions.

Operations are encoded as follows:

  • Operation codes from the binary use only the first byte: 0-255.
  • Engine-only operations, e.g. constraints use 256 and the first byte: 256-511.
  • Animation validators use 512 and the first byte: 512-767

Since only the operation codes come from the binary format, the remaining values can be mapped anywhere without breaking loading.

The encoding intentionally ensures only 16 bits are needed for the enumeration.

Enumerator
KZU_EXPRESSION_VALIDATOR_OPERATION_WRITE 

Simple write operation.

KZU_EXPRESSION_VALIDATOR_OPERATION_ADD 

Addition: param1 + param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_SUBTRACT 

Subtraction: param1 - param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_MULTIPLY 

Multiplication: param1 * param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_DIVIDE 

Division, param1 / param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_MODULO 

Modulo: param1 mod param2 NOTE: This is the actual modulo operation, not remainder.

See also
KZU_EXPRESSION_VALIDATOR_OPERATION_REMAINDER
KZU_EXPRESSION_VALIDATOR_OPERATION_ABS 

Absolute value: abs(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_MIN 

Minimum value: min(param1, param2)

KZU_EXPRESSION_VALIDATOR_OPERATION_MAX 

Maximum value: max(param1, param2)

KZU_EXPRESSION_VALIDATOR_OPERATION_CEIL 

Round towards positive infinity: ceil(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_FLOOR 

Round towards negative infinity: floor(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_ROUND 

Round towards nearest integer or away from zero if halfway: round(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_POW 

Exponent: pow(param1, param2)

KZU_EXPRESSION_VALIDATOR_OPERATION_SQRT 

Square root: sqrt(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_STEP 

Step function of param1 to param2 border.

1 if param1 >= param2, 0 otherwise

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_BOOL 

Converts to boolean: bool(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_INT 

Converts to integer: int(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_FLOAT 

Converts to float: float(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_STRING 

Converts to string: to_string(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_REMAINDER 

Remainder: param1 % param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION 

Create a rotation quaternion using Euler angles stored in param1, param2 and param3.

KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION_X 

Create a rotation quaternion using X rotation Euler angle in param1.

KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION_Y 

Create a rotation quaternion using Y rotation Euler angle in param1.

KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ROTATION_Z 

Create a rotation quaternion using Z rotation Euler angle in param1.

KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE 

Rotate param1 by rotation defined in param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE_X 

Rotate param1 by X rotation defined in param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE_Y 

Rotate param1 by Y rotation defined in param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_ROTATE_Z 

Rotate param1 by Z rotation defined in param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_EXTRACT_EULER_X 

Extract X rotation angle from rotation defined in param1.

KZU_EXPRESSION_VALIDATOR_OPERATION_EXTRACT_EULER_Y 

Extract Y rotation angle from rotation defined in param1.

KZU_EXPRESSION_VALIDATOR_OPERATION_EXTRACT_EULER_Z 

Extract Z rotation angle from rotation defined in param1.

KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CURRENT_VALUE 

Gets the current value of the target.

This operation has no parameters, but it returns the value of the binding target before modifications. Used by modifier bindings.

KZU_EXPRESSION_VALIDATOR_OPERATION_ACQUIRE 

Acquires a resource by a string.

KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_GREATER 

Greater than comparison.

KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_GREATER_OR_EQUAL 

Greater than or equal comparison.

KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_LESS 

Less than comparison.

KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_LESS_OR_EQUAL 

Less than or equal comparison.

KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_EQUAL 

Equal comparison.

KZU_EXPRESSION_VALIDATOR_OPERATION_COMPARE_NOT_EQUAL 

Not equal comparison.

KZU_EXPRESSION_VALIDATOR_OPERATION_LOGICAL_AND 

Greater or equal comparison.

KZU_EXPRESSION_VALIDATOR_OPERATION_LOGICAL_OR 

Greater or equal comparison.

KZU_EXPRESSION_VALIDATOR_OPERATION_LOGICAL_NOT 

Greater or equal comparison.

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_MATRIX3x3 

Converts to string: matrix3x3(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_MATRIX4x4 

Converts to string: matrix4x4(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_SRT2D 

Converts to string: srt2d(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_SRT3D 

Converts to string: srt3d(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_SIN 

Sine: sin(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_COS 

Cosine: cos(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TAN 

Tangent: tan(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_ASIN 

Arcsine: asin(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_ACOS 

Arccosine: acos(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_ATAN 

Arctangent: atan(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_ATAN2 

2-argument arctangent: atan2(param1, param2)

KZU_EXPRESSION_VALIDATOR_OPERATION_SINC 

Sinc: sinc(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_DOT 

Dot product: dot(param1, param2)

KZU_EXPRESSION_VALIDATOR_OPERATION_CROSS 

Cross product: cross(param1, param2)

KZU_EXPRESSION_VALIDATOR_OPERATION_INVERSE 

Inversion.

KZU_EXPRESSION_VALIDATOR_OPERATION_GET_FIELD 

Get a field by index from a vector or matrix type or an indexed range.

KZU_EXPRESSION_VALIDATOR_OPERATION_SET_FIELD 

Set a field by index in a vector or matrix type or an indexed range.

KZU_EXPRESSION_VALIDATOR_OPERATION_TRANSFORM 

Transforms a vector by a same-sized matrix.

KZU_EXPRESSION_VALIDATOR_OPERATION_CLAMP 

Clamp a value between a floor and a ceiling.

KZU_EXPRESSION_VALIDATOR_OPERATION_MIX 

Apply linear interpolation between two values.

KZU_EXPRESSION_VALIDATOR_OPERATION_LINEARSTEP 

Apply linearstep interpolation between two values.

KZU_EXPRESSION_VALIDATOR_OPERATION_SMOOTHSTEP 

Apply smoothstep interpolation between two values.

KZU_EXPRESSION_VALIDATOR_OPERATION_SMOOTHERSTEP 

Apply smootherstep interpolation between two values.

KZU_EXPRESSION_VALIDATOR_OPERATION_GET_PROJECTION_CAMERA_WORLD_MATRIX 

Acquire operation for getProjectionCameraWorldMatrix().

KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CAMERA_WORLD_MATRIX 

Acquire operation for getCameraWorldMatrix().

KZU_EXPRESSION_VALIDATOR_OPERATION_GET_WORLD_MATRIX 

Acquire operation for getWorldMatrix().

KZU_EXPRESSION_VALIDATOR_OPERATION_GET_NORMAL_MATRIX 

Acquire operation for getNormalMatrix().

KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CAMERA_POSITION 

Acquire operation for getCameraPosition().

KZU_EXPRESSION_VALIDATOR_OPERATION_GET_AMBIENT 

Acquire operation for getAmbient().

KZU_EXPRESSION_VALIDATOR_OPERATION_TERNARY_CONDITIONAL 

Ternary conditional (select) operation.

KZU_EXPRESSION_VALIDATOR_OPERATION_LINEAR_TO_SRGB 

Linear to sRGB color conversion operation.

KZU_EXPRESSION_VALIDATOR_OPERATION_SRGB_TO_LINEAR 

Linear to sRGB color conversion operation.

KZU_EXPRESSION_VALIDATOR_OPERATION_TRANSPOSE 

Transpose a matrix.

KZU_EXPRESSION_VALIDATOR_OPERATION_PREMULTIPLY_COLOR 
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_VIEW_POSITION 

Acquire operation for getViewPosition().

KZU_EXPRESSION_VALIDATOR_OPERATION_SPLIT 

Split input into a range.

KZU_EXPRESSION_VALIDATOR_OPERATION_EVALUATE 

Evaluate register contents.

KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_ITERATOR 

Create iterator.

KZU_EXPRESSION_VALIDATOR_OPERATION_CREATE_VIEW 

Create iterator.

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_COLOR4 

Converts to Color: color(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_VECTOR2 

Converts to Color: color(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_VECTOR3 

Converts to Color: color(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TO_VECTOR4 

Converts to Color: color(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_WIDTH 

Gets the width of a texture: textureGetWidth(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_HEIGHT 

Gets the height of a texture: textureGetHeight(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_SIZE 

Gets the size of a texture: textureGetSize(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_PIXEL_FORMAT 

Gets the pixel format of a texture: textureGetPixelFormat(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_ADDRESSING_MODE 

Gets the addressing mode of a texture: textureGetAddressingMode(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_DEPTH_COMPARE_FUNCTION 

Gets the depth compare function of a texture: textureGetDepthCompareFunction(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_FILTER_MODE 

Gets the filter mode of a texture: textureGetFilterMode(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_MIPMAP_MODE 

Gets the mipmap mode of a texture: textureGetMipmapMode(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_ANISOTROPY_LEVEL 

Gets the anisotropy level of a texture: textureGetAnisotropyLevel(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_TEXTURE_GET_MULTISAMPLE_LEVEL 

Gets the multisample level of a texture: textureGetMultisampleLevel(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_NOT 

Inverts the bits of the binary representation of an integer: ~param1.

KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_AND 

Performs the logical AND operation on each pair of the corresponding bits of the binary representations of two integers: param1 & param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_OR 

Performs the logical OR operation on each pair of the corresponding bits of the binary representations of two integers: param1 | param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_XOR 

Performs the logical exclusive or (XOR) operation on each pair of the corresponding bits of the binary representations of two integers: param1 ^ param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_LEFT_SHIFT 

Shifts the bits in the binary representation of an integer (param1) to the left by a given number of positions (param2): param1 << param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_BITWISE_RIGHT_SHIFT 

Shifts the bits in the binary representation of an integer (param1) to the right by a given number of positions (param2): param1 >> param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_HSL_TO_SRGB 

Converts an HSL color to SRGB.

KZU_EXPRESSION_VALIDATOR_OPERATION_SRGB_TO_HSL 

Converts an SRGB color to HSL.

KZU_EXPRESSION_VALIDATOR_OPERATION_SIGN 

Returns the sign of a number: sign(param1)

KZU_EXPRESSION_VALIDATOR_OPERATION_LENGTH 

Returns the length of a vector: length(vector)

KZU_EXPRESSION_VALIDATOR_OPERATION_NORMALIZE 

Normalizes a vector: normalize(vector)

KZU_EXPRESSION_VALIDATOR_OPERATION_GET_ROW 

Returns a row vector in a matrix: getRow(matrix, index)

KZU_EXPRESSION_VALIDATOR_OPERATION_SET_ROW 

Sets a row vector in a matrix: setRow(matrix, index, vector)

KZU_EXPRESSION_VALIDATOR_OPERATION_GET_COLUMN 

Gets a column vector in a matrix: getColumn(matrix, index)

KZU_EXPRESSION_VALIDATOR_OPERATION_SET_COLUMN 

Sets a column vector in a matrix: setColumn(matrix, index, vector)

KZU_EXPRESSION_VALIDATOR_OPERATION_CONTINUE_IF 

Stops executing a binding when the input parameter evaluates to false: continueIf(param1)

Since
Kanzi 3.9.5
KZU_EXPRESSION_VALIDATOR_OPERATION_GET_CAMERA_NORMAL_MATRIX 

Acquire operation for getCameraNormalMatrix().

Since
Kanzi 3.9.6
KZU_EXPRESSION_VALIDATOR_OPERATION_STRING_FORMAT 

Calls the string formatting function with a format string from (param1) and format arguments from the range parameter (param2): stringFormat("foo: {}, bar: {}", ValueRange("baz", 3)) -> ("foo: baz, bar: 3").

KZU_EXPRESSION_VALIDATOR_OPERATION_APPEND_RANGE 

Adds one item (param1) to a value range (param0): appendRange(ValueRange(1,2,3), 4) -> ValueRange(1,2,3,4) Ignores input ranges that are not a ValueRange: appendRange(SplitStringRange("1,2,3", ","), 4) -> ValueRange(4) Accepts null ValueRanges: appendRange(nullptr, 5) -> ValueRange(5)

KZU_EXPRESSION_VALIDATOR_OPERATION_POSITION_CONSTRAINT 

Locks position component of SRT3D transformation param1 to position component of param2.

Values beyond this point are NOT shared in the binary format and are unknown to Studio, only being internal to the engine.

KZU_EXPRESSION_VALIDATOR_OPERATION_ORIENTATION_CONSTRAINT 

Locks rotation component of SRT3D transformation param1 to position component of param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_LOOK_AT_CONSTRAINT 

Orients SRT3D transformation in param1 to look at position specified by param2.

KZU_EXPRESSION_VALIDATOR_OPERATION_REVERSED_LOOK_AT_CONSTRAINT 

Orients SRT3D transformation in param2 to look at position specified by param1.

KZU_EXPRESSION_VALIDATOR_OPERATION_REVERSED_CYLINDRICAL_LOOK_AT_CONSTRAINT 

Orients SRT3D transformation in param2 to look at position specified by param1.

The orientation is calculated in cylindrical fashion. Up vector always points to positive Y axis.

KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR 

Processor operator is a special case.

The OpCode refers to index of an expression processor, which points to a different array than the regular binding processors. To get the referred processor index from the operation code, subtract the base value.

KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_0 

Convenience identifier for first operation processor.

KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_1 

Convenience identifier for second operation processor.

KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_2 

Convenience identifier for third operation processor.

KZU_EXPRESSION_VALIDATOR_OPERATION_PROCESSOR_3 

Convenience identifier for fourth operation processor.

KZU_EXPRESSION_VALIDATOR_OPERATION_INVALID 

Invalid operation for placeholder purposes.

Since
Kanzi 3.9.6

Function Documentation

bool kanzi::variantSetToDataObject ( const Variant value,
DataObject dataObject 
)

Sets variant value to a data object.

Parameters
valueVariant to set.
dataObjectTarget data object.
Returns
True if write succeeded, false on failure.
BindingLoadInfo kanzi::loadBinding ( KzbFile kzbFile,
KzbMemoryParser parser 
)

Loads a binding from a kzb file.

Parameters
kzbFileThe kzb file from which to load a binding.
parserThe parser from which to read a binding.
Returns
The loaded binding.
void kanzi::loadBindings ( KzbFile kzbFile,
KzbMemoryParser parser,
vector< BindingLoadInfo > &  bindings 
)

Loads bindings from a kzb file.

Parameters
kzbFileThe kzb file from which to load bindings.
parserThe parser from which to read bindings.
bindingsThe Bindings container where the loaded bindings are stored.
bool kanzi::expressionOperationWrite ( BindingExpressionOpCodeParameters params)

Execute write operation.

This operation is separate from all regular operations to allow it to be executed directly as part of other bindings. Write operation is allowed to skip some phases of operation execution, improving performance.

Parameters
paramsParameters for write.
Returns
True on execution successful, false otherwise.
string kanzi::getExpressionOperationName ( KzuExpressionValidatorOperation  operation)

Gets a string representation of an expression validator operator.

Parameters
operationOperation code.
Returns
String representation of the operation code.
Since
Kanzi 3.9.7
BindingExpressionFunction kanzi::bindingExpressionFunctionFromOperation ( KzuExpressionValidatorOperation  operation)

Converts expression validation operation to a binding expression function.

Parameters
operationOperation id.
Returns
Function for binding expression.
int kanzi::bindingExpressionDivide ( int  lhs,
int  rhs 
)

Integer divide the expression way.

Zero divisor results in value 0.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Operation result.
float kanzi::bindingExpressionDivide ( float  lhs,
float  rhs 
)

Floating point divide the expression way.

Zero divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Operation result.
ColorRGBA kanzi::bindingExpressionDivide ( const ColorRGBA lhs,
const ColorRGBA rhs 
)

Color divide the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
Vector2 kanzi::bindingExpressionDivide ( const Vector2 lhs,
const Vector2 rhs 
)

Vector2 divide the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
Vector3 kanzi::bindingExpressionDivide ( const Vector3 lhs,
const Vector3 rhs 
)

Vector3 divide the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
Vector4 kanzi::bindingExpressionDivide ( const Vector4 lhs,
const Vector4 rhs 
)

Vector4 divide the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
int kanzi::bindingExpressionRemainder ( int  lhs,
int  rhs 
)

Integer remainder the expression way.

Zero divisor results in value 0.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Operation result.
float kanzi::bindingExpressionRemainder ( float  lhs,
float  rhs 
)

Floating point remainder the expression way.

Zero divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Operation result.
ColorRGBA kanzi::bindingExpressionRemainder ( const ColorRGBA lhs,
const ColorRGBA rhs 
)

Color remainder the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
Vector2 kanzi::bindingExpressionRemainder ( const Vector2 lhs,
const Vector2 rhs 
)

Vector2 remainder the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
Vector3 kanzi::bindingExpressionRemainder ( const Vector3 lhs,
const Vector3 rhs 
)

Vector3 remainder the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
Vector4 kanzi::bindingExpressionRemainder ( const Vector4 lhs,
const Vector4 rhs 
)

Vector4 remainder the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
int kanzi::bindingExpressionModulo ( int  lhs,
int  rhs 
)

Integer modulo the expression way.

Zero divisor results in value 0.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
float kanzi::bindingExpressionModulo ( float  lhs,
float  rhs 
)

Floating point modulo the expression way.

Zero divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
ColorRGBA kanzi::bindingExpressionModulo ( const ColorRGBA lhs,
const ColorRGBA rhs 
)

Color modulo the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
Vector2 kanzi::bindingExpressionModulo ( const Vector2 lhs,
const Vector2 rhs 
)

Vector2 modulo the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
Vector3 kanzi::bindingExpressionModulo ( const Vector3 lhs,
const Vector3 rhs 
)

Vector3 modulo the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
Vector4 kanzi::bindingExpressionModulo ( const Vector4 lhs,
const Vector4 rhs 
)

Vector4 modulo the expression way.

Zero component divisor results in value 0.0f.

Parameters
lhsLeft-hand side operand (dividend).
rhsRight-hand side operand (divisor).
Returns
Dividend modulo divisor.
PropertyField kanzi::propertyFieldFromBinaryTargetAttribute ( KzuPropertyBinaryTargetAttribute  attribute)

Converts a property target attribute from binary into a property field.

Parameters
attributeBinary target attribute read from a file.
Returns
Property field.
bool kanzi::isFixedOperationOpCode ( KzuExpressionValidatorOperation  opCode)

Tells if given operation code corresponds with a fixed operation.

Parameters
opCodeOperation code to check.
Returns
True if the operation code is a fixed op, false otherwise.
Matrix4x4 kanzi::bindingFixedOperationGetProjectionCameraWorldMatrix ( RenderPass renderPass,
Node node 
)

Fixed operation to acquire projection camera world matrix.

This fixed operation is exposed for use in fixed uniform functions.

Parameters
renderPassRender pass for this context.
nodeNode for this context.
Returns
Calculated matrix.
Matrix4x4 kanzi::bindingFixedOperationGetCameraWorldMatrix ( RenderPass renderPass,
Node node 
)

Fixed operation to acquire camera world matrix.

This fixed operation is exposed for use in fixed uniform functions.

Parameters
renderPassRender pass for this context.
nodeNode for this context.
Returns
Calculated matrix.
Matrix4x4 kanzi::bindingFixedOperationGetWorldMatrix ( Node node)

Fixed operation to acquire world matrix.

This fixed operation is exposed for use in fixed uniform functions.

Parameters
nodeNode for this context.
Returns
Object matrix.
Matrix4x4 kanzi::bindingFixedOperationGetNormalMatrix ( Node node)

Fixed operation to acquire normal matrix.

This fixed operation is exposed for use in fixed uniform functions.

Parameters
nodeNode for this context.
Matrix4x4 kanzi::bindingFixedOperationGetCameraNormalMatrix ( RenderPass renderPass,
Node node 
)

Fixed operation to acquire camera normal matrix.

This fixed operation is exposed for use in fixed uniform functions.

Parameters
renderPassRender pass for this context.
nodeNode for this context.
Returns
Calculated matrix.
Since
Kanzi 3.9.6
Vector3 kanzi::bindingFixedOperationGetCameraPosition ( RenderPass renderPass)

Fixed operation to acquire camera position vector.

This fixed operation is exposed for use in fixed uniform functions.

Parameters
renderPassRender pass for this context.
Returns
Position vector.
Vector4 kanzi::bindingFixedOperationGetViewPosition ( RenderPass renderPass)

Fixed operation to acquire homogeneous view position vector.

This fixed operation is exposed for use in fixed uniform functions.

Parameters
renderPassRender pass for this context.
Returns
Position vector.
ColorRGBA kanzi::bindingFixedOperationGetAmbient ( Node node,
const Material material 
)

Fixed operation to acquire ambient color.

This fixed operation is exposed for use in fixed uniform functions.

Parameters
nodeNode for this context.
materialMaterial fallback for the property values.
Returns
Position vector.
Quaternion kanzi::getQuaternionField ( const Variant variant,
PropertyField  field 
)

Gets a quaternion field from a variant.

Parameters
variantVariant from which to extract.
fieldField to extract.
Returns
Result quaternion.
Since
Kanzi 3.9.5
void kanzi::extractExpressionField ( Variant outputRegister,
const Variant inputRegister,
PropertyField  field 
)

Reads a field from an input register and writes it to the output register.

Parameters
outputRegisterOutput register to which to write.
inputRegisterInput register from which to read.
fieldField to read.
Since
Kanzi 3.9.5